import service from "@/path/service"
import { useUserInfoStore } from '@/path/store/userInfo';
export function onContactSales(carid,data) {
  const userStore = useUserInfoStore()
  if (!userStore.configs?.sys_phone) {
    uni.showToast({
      title: "暂未开通客服",
      icon: "none"
    })
    return
  }
  uni.makePhoneCall({
    phoneNumber: userStore.configs.sys_phone
  })
  service.post("api/ycg/car/addclue", {
    customerName: userStore.userInfo.username,
    customerPhone: userStore.userInfo.mobile,
    car_id: carid,
    remark: "",
  })
}